package com.demo.thread;

import com.demo.service.StagesDetailService;
import com.demo.util.SpringUtil;
import lombok.extern.slf4j.Slf4j;

/**
 * @author leiliang
 * @version 1.0
 * @Description
 * @date 2021/2/26 13:52
 */
@Slf4j
public class NotifyThread extends  Thread {

    private String dodate;
    private String startHour;
    private String endHour;


    public NotifyThread(String dodate, String startHour, String endHour) {
        this.dodate = dodate;
        this.startHour = startHour;
        this.endHour = endHour;
    }

    @Override
    public void run() {
        log.info("返利通知线程开始，日期：{}", dodate);
        StagesDetailService stagesDetailService = SpringUtil.getObject(StagesDetailService.class);
        stagesDetailService.doRebateNotify(dodate, startHour, endHour);
        super.run();
    }
}
